import 'package:seedfour/generated/json/base/json_convert_content.dart';
import 'package:seedfour/app/models/test_case_entity.dart';

TestCaseEntity $TestCaseEntityFromJson(Map<String, dynamic> json) {
  final TestCaseEntity testCaseEntity = TestCaseEntity();
  final TestCaseCaseInfo? caseInfo = jsonConvert.convert<TestCaseCaseInfo>(
      json['caseInfo']);
  if (caseInfo != null) {
    testCaseEntity.caseInfo = caseInfo;
  }
  final List<TestCaseApproveList>? approveList = (json['approveList'] as List<
      dynamic>?)
      ?.map(
          (e) =>
      jsonConvert.convert<TestCaseApproveList>(e) as TestCaseApproveList)
      .toList();
  if (approveList != null) {
    testCaseEntity.approveList = approveList;
  }
  final List<
      TestCaseDeliveryList>? deliveryList = (json['deliveryList'] as List<
      dynamic>?)
      ?.map(
          (e) =>
      jsonConvert.convert<TestCaseDeliveryList>(e) as TestCaseDeliveryList)
      .toList();
  if (deliveryList != null) {
    testCaseEntity.deliveryList = deliveryList;
  }
  final List<dynamic>? archFiles = (json['archFiles'] as List<dynamic>?)?.map(
          (e) => e).toList();
  if (archFiles != null) {
    testCaseEntity.archFiles = archFiles;
  }
  final List<
      TestCaseContractFiles>? contractFiles = (json['contractFiles'] as List<
      dynamic>?)
      ?.map(
          (e) =>
      jsonConvert.convert<TestCaseContractFiles>(e) as TestCaseContractFiles)
      .toList();
  if (contractFiles != null) {
    testCaseEntity.contractFiles = contractFiles;
  }
  final List<
      TestCaseOfflineDeliveryList>? offlineDeliveryList = (json['offlineDeliveryList'] as List<
      dynamic>?)?.map(
          (e) =>
      jsonConvert.convert<TestCaseOfflineDeliveryList>(
          e) as TestCaseOfflineDeliveryList).toList();
  if (offlineDeliveryList != null) {
    testCaseEntity.offlineDeliveryList = offlineDeliveryList;
  }
  final List<TestCaseOrders>? orders = (json['orders'] as List<dynamic>?)
      ?.map(
          (e) => jsonConvert.convert<TestCaseOrders>(e) as TestCaseOrders)
      .toList();
  if (orders != null) {
    testCaseEntity.orders = orders;
  }
  return testCaseEntity;
}

Map<String, dynamic> $TestCaseEntityToJson(TestCaseEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['caseInfo'] = entity.caseInfo?.toJson();
  data['approveList'] = entity.approveList?.map((v) => v.toJson()).toList();
  data['deliveryList'] = entity.deliveryList?.map((v) => v.toJson()).toList();
  data['archFiles'] = entity.archFiles;
  data['contractFiles'] = entity.contractFiles?.map((v) => v.toJson()).toList();
  data['offlineDeliveryList'] =
      entity.offlineDeliveryList?.map((v) => v.toJson()).toList();
  data['orders'] = entity.orders?.map((v) => v.toJson()).toList();
  return data;
}

extension TestCaseEntityExtension on TestCaseEntity {
  TestCaseEntity copyWith({
    TestCaseCaseInfo? caseInfo,
    List<TestCaseApproveList>? approveList,
    List<TestCaseDeliveryList>? deliveryList,
    List<dynamic>? archFiles,
    List<TestCaseContractFiles>? contractFiles,
    List<TestCaseOfflineDeliveryList>? offlineDeliveryList,
    List<TestCaseOrders>? orders,
  }) {
    return TestCaseEntity()
      ..caseInfo = caseInfo ?? this.caseInfo
      ..approveList = approveList ?? this.approveList
      ..deliveryList = deliveryList ?? this.deliveryList
      ..archFiles = archFiles ?? this.archFiles
      ..contractFiles = contractFiles ?? this.contractFiles
      ..offlineDeliveryList = offlineDeliveryList ?? this.offlineDeliveryList
      ..orders = orders ?? this.orders;
  }
}

TestCaseCaseInfo $TestCaseCaseInfoFromJson(Map<String, dynamic> json) {
  final TestCaseCaseInfo testCaseCaseInfo = TestCaseCaseInfo();
  final int? createdAt = jsonConvert.convert<int>(json['createdAt']);
  if (createdAt != null) {
    testCaseCaseInfo.createdAt = createdAt;
  }
  final int? updatedAt = jsonConvert.convert<int>(json['updatedAt']);
  if (updatedAt != null) {
    testCaseCaseInfo.updatedAt = updatedAt;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    testCaseCaseInfo.id = id;
  }
  final dynamic batchId = json['batchId'];
  if (batchId != null) {
    testCaseCaseInfo.batchId = batchId;
  }
  final String? orgId = jsonConvert.convert<String>(json['orgId']);
  if (orgId != null) {
    testCaseCaseInfo.orgId = orgId;
  }
  final String? clientCode = jsonConvert.convert<String>(json['clientCode']);
  if (clientCode != null) {
    testCaseCaseInfo.clientCode = clientCode;
  }
  final String? clientName = jsonConvert.convert<String>(json['clientName']);
  if (clientName != null) {
    testCaseCaseInfo.clientName = clientName;
  }
  final dynamic clientContact = json['clientContact'];
  if (clientContact != null) {
    testCaseCaseInfo.clientContact = clientContact;
  }
  final dynamic clientMobile = json['clientMobile'];
  if (clientMobile != null) {
    testCaseCaseInfo.clientMobile = clientMobile;
  }
  final dynamic clientEmail = json['clientEmail'];
  if (clientEmail != null) {
    testCaseCaseInfo.clientEmail = clientEmail;
  }
  final String? oppositeCode = jsonConvert.convert<String>(
      json['oppositeCode']);
  if (oppositeCode != null) {
    testCaseCaseInfo.oppositeCode = oppositeCode;
  }
  final String? oppositeName = jsonConvert.convert<String>(
      json['oppositeName']);
  if (oppositeName != null) {
    testCaseCaseInfo.oppositeName = oppositeName;
  }
  final String? thirdCode = jsonConvert.convert<String>(json['thirdCode']);
  if (thirdCode != null) {
    testCaseCaseInfo.thirdCode = thirdCode;
  }
  final String? thirdName = jsonConvert.convert<String>(json['thirdName']);
  if (thirdName != null) {
    testCaseCaseInfo.thirdName = thirdName;
  }
  final String? caseName = jsonConvert.convert<String>(json['caseName']);
  if (caseName != null) {
    testCaseCaseInfo.caseName = caseName;
  }
  final String? caseStatus = jsonConvert.convert<String>(json['caseStatus']);
  if (caseStatus != null) {
    testCaseCaseInfo.caseStatus = caseStatus;
  }
  final String? caseClass = jsonConvert.convert<String>(json['caseClass']);
  if (caseClass != null) {
    testCaseCaseInfo.caseClass = caseClass;
  }
  final String? caseBusiness = jsonConvert.convert<String>(
      json['caseBusiness']);
  if (caseBusiness != null) {
    testCaseCaseInfo.caseBusiness = caseBusiness;
  }
  final dynamic caseLevel1 = json['caseLevel1'];
  if (caseLevel1 != null) {
    testCaseCaseInfo.caseLevel1 = caseLevel1;
  }
  final dynamic caseLevel2 = json['caseLevel2'];
  if (caseLevel2 != null) {
    testCaseCaseInfo.caseLevel2 = caseLevel2;
  }
  final String? taker = jsonConvert.convert<String>(json['taker']);
  if (taker != null) {
    testCaseCaseInfo.taker = taker;
  }
  final String? payer = jsonConvert.convert<String>(json['payer']);
  if (payer != null) {
    testCaseCaseInfo.payer = payer;
  }
  final String? auditor = jsonConvert.convert<String>(json['auditor']);
  if (auditor != null) {
    testCaseCaseInfo.auditor = auditor;
  }
  final String? remarks = jsonConvert.convert<String>(json['remarks']);
  if (remarks != null) {
    testCaseCaseInfo.remarks = remarks;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    testCaseCaseInfo.name = name;
  }
  final String? takername = jsonConvert.convert<String>(json['takername']);
  if (takername != null) {
    testCaseCaseInfo.takername = takername;
  }
  final int? auditedAt = jsonConvert.convert<int>(json['auditedAt']);
  if (auditedAt != null) {
    testCaseCaseInfo.auditedAt = auditedAt;
  }
  final int? paymentAt = jsonConvert.convert<int>(json['paymentAt']);
  if (paymentAt != null) {
    testCaseCaseInfo.paymentAt = paymentAt;
  }
  final dynamic settledAt = json['settledAt'];
  if (settledAt != null) {
    testCaseCaseInfo.settledAt = settledAt;
  }
  final String? caseDate = jsonConvert.convert<String>(json['caseDate']);
  if (caseDate != null) {
    testCaseCaseInfo.caseDate = caseDate;
  }
  final String? suitType = jsonConvert.convert<String>(json['suitType']);
  if (suitType != null) {
    testCaseCaseInfo.suitType = suitType;
  }
  final String? lawsuitType = jsonConvert.convert<String>(json['lawsuitType']);
  if (lawsuitType != null) {
    testCaseCaseInfo.lawsuitType = lawsuitType;
  }
  final int? marginAmount = jsonConvert.convert<int>(json['marginAmount']);
  if (marginAmount != null) {
    testCaseCaseInfo.marginAmount = marginAmount;
  }
  final String? archive = jsonConvert.convert<String>(json['archive']);
  if (archive != null) {
    testCaseCaseInfo.archive = archive;
  }
  final String? cico = jsonConvert.convert<String>(json['cico']);
  if (cico != null) {
    testCaseCaseInfo.cico = cico;
  }
  final String? takerStr = jsonConvert.convert<String>(json['takerStr']);
  if (takerStr != null) {
    testCaseCaseInfo.takerStr = takerStr;
  }
  final bool? isOwner = jsonConvert.convert<bool>(json['isOwner']);
  if (isOwner != null) {
    testCaseCaseInfo.isOwner = isOwner;
  }
  final String? caseTypeStr = jsonConvert.convert<String>(json['caseTypeStr']);
  if (caseTypeStr != null) {
    testCaseCaseInfo.caseTypeStr = caseTypeStr;
  }
  final String? caseNameStr = jsonConvert.convert<String>(json['caseNameStr']);
  if (caseNameStr != null) {
    testCaseCaseInfo.caseNameStr = caseNameStr;
  }
  final bool? isSignedContract = jsonConvert.convert<bool>(
      json['isSignedContract']);
  if (isSignedContract != null) {
    testCaseCaseInfo.isSignedContract = isSignedContract;
  }
  return testCaseCaseInfo;
}

Map<String, dynamic> $TestCaseCaseInfoToJson(TestCaseCaseInfo entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['createdAt'] = entity.createdAt;
  data['updatedAt'] = entity.updatedAt;
  data['id'] = entity.id;
  data['batchId'] = entity.batchId;
  data['orgId'] = entity.orgId;
  data['clientCode'] = entity.clientCode;
  data['clientName'] = entity.clientName;
  data['clientContact'] = entity.clientContact;
  data['clientMobile'] = entity.clientMobile;
  data['clientEmail'] = entity.clientEmail;
  data['oppositeCode'] = entity.oppositeCode;
  data['oppositeName'] = entity.oppositeName;
  data['thirdCode'] = entity.thirdCode;
  data['thirdName'] = entity.thirdName;
  data['caseName'] = entity.caseName;
  data['caseStatus'] = entity.caseStatus;
  data['caseClass'] = entity.caseClass;
  data['caseBusiness'] = entity.caseBusiness;
  data['caseLevel1'] = entity.caseLevel1;
  data['caseLevel2'] = entity.caseLevel2;
  data['taker'] = entity.taker;
  data['payer'] = entity.payer;
  data['auditor'] = entity.auditor;
  data['remarks'] = entity.remarks;
  data['name'] = entity.name;
  data['takername'] = entity.takername;
  data['auditedAt'] = entity.auditedAt;
  data['paymentAt'] = entity.paymentAt;
  data['settledAt'] = entity.settledAt;
  data['caseDate'] = entity.caseDate;
  data['suitType'] = entity.suitType;
  data['lawsuitType'] = entity.lawsuitType;
  data['marginAmount'] = entity.marginAmount;
  data['archive'] = entity.archive;
  data['cico'] = entity.cico;
  data['takerStr'] = entity.takerStr;
  data['isOwner'] = entity.isOwner;
  data['caseTypeStr'] = entity.caseTypeStr;
  data['caseNameStr'] = entity.caseNameStr;
  data['isSignedContract'] = entity.isSignedContract;
  return data;
}

extension TestCaseCaseInfoExtension on TestCaseCaseInfo {
  TestCaseCaseInfo copyWith({
    int? createdAt,
    int? updatedAt,
    String? id,
    dynamic batchId,
    String? orgId,
    String? clientCode,
    String? clientName,
    dynamic clientContact,
    dynamic clientMobile,
    dynamic clientEmail,
    String? oppositeCode,
    String? oppositeName,
    String? thirdCode,
    String? thirdName,
    String? caseName,
    String? caseStatus,
    String? caseClass,
    String? caseBusiness,
    dynamic caseLevel1,
    dynamic caseLevel2,
    String? taker,
    String? payer,
    String? auditor,
    String? remarks,
    String? name,
    String? takername,
    int? auditedAt,
    int? paymentAt,
    dynamic settledAt,
    String? caseDate,
    String? suitType,
    String? lawsuitType,
    int? marginAmount,
    String? archive,
    String? cico,
    String? takerStr,
    bool? isOwner,
    String? caseTypeStr,
    String? caseNameStr,
    bool? isSignedContract,
  }) {
    return TestCaseCaseInfo()
      ..createdAt = createdAt ?? this.createdAt
      ..updatedAt = updatedAt ?? this.updatedAt
      ..id = id ?? this.id
      ..batchId = batchId ?? this.batchId
      ..orgId = orgId ?? this.orgId
      ..clientCode = clientCode ?? this.clientCode
      ..clientName = clientName ?? this.clientName
      ..clientContact = clientContact ?? this.clientContact
      ..clientMobile = clientMobile ?? this.clientMobile
      ..clientEmail = clientEmail ?? this.clientEmail
      ..oppositeCode = oppositeCode ?? this.oppositeCode
      ..oppositeName = oppositeName ?? this.oppositeName
      ..thirdCode = thirdCode ?? this.thirdCode
      ..thirdName = thirdName ?? this.thirdName
      ..caseName = caseName ?? this.caseName
      ..caseStatus = caseStatus ?? this.caseStatus
      ..caseClass = caseClass ?? this.caseClass
      ..caseBusiness = caseBusiness ?? this.caseBusiness
      ..caseLevel1 = caseLevel1 ?? this.caseLevel1
      ..caseLevel2 = caseLevel2 ?? this.caseLevel2
      ..taker = taker ?? this.taker
      ..payer = payer ?? this.payer
      ..auditor = auditor ?? this.auditor
      ..remarks = remarks ?? this.remarks
      ..name = name ?? this.name
      ..takername = takername ?? this.takername
      ..auditedAt = auditedAt ?? this.auditedAt
      ..paymentAt = paymentAt ?? this.paymentAt
      ..settledAt = settledAt ?? this.settledAt
      ..caseDate = caseDate ?? this.caseDate
      ..suitType = suitType ?? this.suitType
      ..lawsuitType = lawsuitType ?? this.lawsuitType
      ..marginAmount = marginAmount ?? this.marginAmount
      ..archive = archive ?? this.archive
      ..cico = cico ?? this.cico
      ..takerStr = takerStr ?? this.takerStr
      ..isOwner = isOwner ?? this.isOwner
      ..caseTypeStr = caseTypeStr ?? this.caseTypeStr
      ..caseNameStr = caseNameStr ?? this.caseNameStr
      ..isSignedContract = isSignedContract ?? this.isSignedContract;
  }
}

TestCaseApproveList $TestCaseApproveListFromJson(Map<String, dynamic> json) {
  final TestCaseApproveList testCaseApproveList = TestCaseApproveList();
  final int? createdAt = jsonConvert.convert<int>(json['createdAt']);
  if (createdAt != null) {
    testCaseApproveList.createdAt = createdAt;
  }
  final int? updatedAt = jsonConvert.convert<int>(json['updatedAt']);
  if (updatedAt != null) {
    testCaseApproveList.updatedAt = updatedAt;
  }
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    testCaseApproveList.id = id;
  }
  final String? caseId = jsonConvert.convert<String>(json['caseId']);
  if (caseId != null) {
    testCaseApproveList.caseId = caseId;
  }
  final String? uid = jsonConvert.convert<String>(json['uid']);
  if (uid != null) {
    testCaseApproveList.uid = uid;
  }
  final int? type = jsonConvert.convert<int>(json['type']);
  if (type != null) {
    testCaseApproveList.type = type;
  }
  final int? approve = jsonConvert.convert<int>(json['approve']);
  if (approve != null) {
    testCaseApproveList.approve = approve;
  }
  final String? remark = jsonConvert.convert<String>(json['remark']);
  if (remark != null) {
    testCaseApproveList.remark = remark;
  }
  final String? approverName = jsonConvert.convert<String>(
      json['approverName']);
  if (approverName != null) {
    testCaseApproveList.approverName = approverName;
  }
  return testCaseApproveList;
}

Map<String, dynamic> $TestCaseApproveListToJson(TestCaseApproveList entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['createdAt'] = entity.createdAt;
  data['updatedAt'] = entity.updatedAt;
  data['id'] = entity.id;
  data['caseId'] = entity.caseId;
  data['uid'] = entity.uid;
  data['type'] = entity.type;
  data['approve'] = entity.approve;
  data['remark'] = entity.remark;
  data['approverName'] = entity.approverName;
  return data;
}

extension TestCaseApproveListExtension on TestCaseApproveList {
  TestCaseApproveList copyWith({
    int? createdAt,
    int? updatedAt,
    int? id,
    String? caseId,
    String? uid,
    int? type,
    int? approve,
    String? remark,
    String? approverName,
  }) {
    return TestCaseApproveList()
      ..createdAt = createdAt ?? this.createdAt
      ..updatedAt = updatedAt ?? this.updatedAt
      ..id = id ?? this.id
      ..caseId = caseId ?? this.caseId
      ..uid = uid ?? this.uid
      ..type = type ?? this.type
      ..approve = approve ?? this.approve
      ..remark = remark ?? this.remark
      ..approverName = approverName ?? this.approverName;
  }
}

TestCaseDeliveryList $TestCaseDeliveryListFromJson(Map<String, dynamic> json) {
  final TestCaseDeliveryList testCaseDeliveryList = TestCaseDeliveryList();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    testCaseDeliveryList.id = id;
  }
  final int? ph = jsonConvert.convert<int>(json['ph']);
  if (ph != null) {
    testCaseDeliveryList.ph = ph;
  }
  final int? req = jsonConvert.convert<int>(json['req']);
  if (req != null) {
    testCaseDeliveryList.req = req;
  }
  final String? desc = jsonConvert.convert<String>(json['desc']);
  if (desc != null) {
    testCaseDeliveryList.desc = desc;
  }
  final bool? checked = jsonConvert.convert<bool>(json['checked']);
  if (checked != null) {
    testCaseDeliveryList.checked = checked;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    testCaseDeliveryList.name = name;
  }
  final int? reqid = jsonConvert.convert<int>(json['reqid']);
  if (reqid != null) {
    testCaseDeliveryList.reqid = reqid;
  }
  final String? desc2 = jsonConvert.convert<String>(json['desc2']);
  if (desc2 != null) {
    testCaseDeliveryList.desc2 = desc2;
  }
  return testCaseDeliveryList;
}

Map<String, dynamic> $TestCaseDeliveryListToJson(TestCaseDeliveryList entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['ph'] = entity.ph;
  data['req'] = entity.req;
  data['desc'] = entity.desc;
  data['checked'] = entity.checked;
  data['name'] = entity.name;
  data['reqid'] = entity.reqid;
  data['desc2'] = entity.desc2;
  return data;
}

extension TestCaseDeliveryListExtension on TestCaseDeliveryList {
  TestCaseDeliveryList copyWith({
    int? id,
    int? ph,
    int? req,
    String? desc,
    bool? checked,
    String? name,
    int? reqid,
    String? desc2,
  }) {
    return TestCaseDeliveryList()
      ..id = id ?? this.id
      ..ph = ph ?? this.ph
      ..req = req ?? this.req
      ..desc = desc ?? this.desc
      ..checked = checked ?? this.checked
      ..name = name ?? this.name
      ..reqid = reqid ?? this.reqid
      ..desc2 = desc2 ?? this.desc2;
  }
}

TestCaseContractFiles $TestCaseContractFilesFromJson(
    Map<String, dynamic> json) {
  final TestCaseContractFiles testCaseContractFiles = TestCaseContractFiles();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    testCaseContractFiles.id = id;
  }
  final String? desc = jsonConvert.convert<String>(json['desc']);
  if (desc != null) {
    testCaseContractFiles.desc = desc;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    testCaseContractFiles.name = name;
  }
  final String? dname = jsonConvert.convert<String>(json['dname']);
  if (dname != null) {
    testCaseContractFiles.dname = dname;
  }
  return testCaseContractFiles;
}

Map<String, dynamic> $TestCaseContractFilesToJson(
    TestCaseContractFiles entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['desc'] = entity.desc;
  data['name'] = entity.name;
  data['dname'] = entity.dname;
  return data;
}

extension TestCaseContractFilesExtension on TestCaseContractFiles {
  TestCaseContractFiles copyWith({
    int? id,
    String? desc,
    String? name,
    String? dname,
  }) {
    return TestCaseContractFiles()
      ..id = id ?? this.id
      ..desc = desc ?? this.desc
      ..name = name ?? this.name
      ..dname = dname ?? this.dname;
  }
}

TestCaseOfflineDeliveryList $TestCaseOfflineDeliveryListFromJson(
    Map<String, dynamic> json) {
  final TestCaseOfflineDeliveryList testCaseOfflineDeliveryList = TestCaseOfflineDeliveryList();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    testCaseOfflineDeliveryList.id = id;
  }
  final int? ph = jsonConvert.convert<int>(json['ph']);
  if (ph != null) {
    testCaseOfflineDeliveryList.ph = ph;
  }
  final int? req = jsonConvert.convert<int>(json['req']);
  if (req != null) {
    testCaseOfflineDeliveryList.req = req;
  }
  final String? desc = jsonConvert.convert<String>(json['desc']);
  if (desc != null) {
    testCaseOfflineDeliveryList.desc = desc;
  }
  final bool? checked = jsonConvert.convert<bool>(json['checked']);
  if (checked != null) {
    testCaseOfflineDeliveryList.checked = checked;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    testCaseOfflineDeliveryList.name = name;
  }
  final int? reqid = jsonConvert.convert<int>(json['reqid']);
  if (reqid != null) {
    testCaseOfflineDeliveryList.reqid = reqid;
  }
  final String? desc2 = jsonConvert.convert<String>(json['desc2']);
  if (desc2 != null) {
    testCaseOfflineDeliveryList.desc2 = desc2;
  }
  return testCaseOfflineDeliveryList;
}

Map<String, dynamic> $TestCaseOfflineDeliveryListToJson(
    TestCaseOfflineDeliveryList entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['ph'] = entity.ph;
  data['req'] = entity.req;
  data['desc'] = entity.desc;
  data['checked'] = entity.checked;
  data['name'] = entity.name;
  data['reqid'] = entity.reqid;
  data['desc2'] = entity.desc2;
  return data;
}

extension TestCaseOfflineDeliveryListExtension on TestCaseOfflineDeliveryList {
  TestCaseOfflineDeliveryList copyWith({
    int? id,
    int? ph,
    int? req,
    String? desc,
    bool? checked,
    String? name,
    int? reqid,
    String? desc2,
  }) {
    return TestCaseOfflineDeliveryList()
      ..id = id ?? this.id
      ..ph = ph ?? this.ph
      ..req = req ?? this.req
      ..desc = desc ?? this.desc
      ..checked = checked ?? this.checked
      ..name = name ?? this.name
      ..reqid = reqid ?? this.reqid
      ..desc2 = desc2 ?? this.desc2;
  }
}

TestCaseOrders $TestCaseOrdersFromJson(Map<String, dynamic> json) {
  final TestCaseOrders testCaseOrders = TestCaseOrders();
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    testCaseOrders.id = id;
  }
  final String? title = jsonConvert.convert<String>(json['title']);
  if (title != null) {
    testCaseOrders.title = title;
  }
  final int? createdAt = jsonConvert.convert<int>(json['createdAt']);
  if (createdAt != null) {
    testCaseOrders.createdAt = createdAt;
  }
  final int? orderPayStatus = jsonConvert.convert<int>(json['orderPayStatus']);
  if (orderPayStatus != null) {
    testCaseOrders.orderPayStatus = orderPayStatus;
  }
  final int? orderChargeStatus = jsonConvert.convert<int>(
      json['orderChargeStatus']);
  if (orderChargeStatus != null) {
    testCaseOrders.orderChargeStatus = orderChargeStatus;
  }
  final String? orderChannelType = jsonConvert.convert<String>(
      json['orderChannelType']);
  if (orderChannelType != null) {
    testCaseOrders.orderChannelType = orderChannelType;
  }
  final int? orderAmount = jsonConvert.convert<int>(json['orderAmount']);
  if (orderAmount != null) {
    testCaseOrders.orderAmount = orderAmount;
  }
  final int? marginAmount = jsonConvert.convert<int>(json['marginAmount']);
  if (marginAmount != null) {
    testCaseOrders.marginAmount = marginAmount;
  }
  final String? agentUid = jsonConvert.convert<String>(json['agentUid']);
  if (agentUid != null) {
    testCaseOrders.agentUid = agentUid;
  }
  final int? collectionDate = jsonConvert.convert<int>(json['collectionDate']);
  if (collectionDate != null) {
    testCaseOrders.collectionDate = collectionDate;
  }
  final String? agentUsername = jsonConvert.convert<String>(
      json['agentUsername']);
  if (agentUsername != null) {
    testCaseOrders.agentUsername = agentUsername;
  }
  final String? invoice = jsonConvert.convert<String>(json['invoice']);
  if (invoice != null) {
    testCaseOrders.invoice = invoice;
  }
  final String? createdAtStr = jsonConvert.convert<String>(
      json['createdAtStr']);
  if (createdAtStr != null) {
    testCaseOrders.createdAtStr = createdAtStr;
  }
  final String? collectionDateStr = jsonConvert.convert<String>(
      json['collectionDateStr']);
  if (collectionDateStr != null) {
    testCaseOrders.collectionDateStr = collectionDateStr;
  }
  final String? orderAmountStr = jsonConvert.convert<String>(
      json['orderAmountStr']);
  if (orderAmountStr != null) {
    testCaseOrders.orderAmountStr = orderAmountStr;
  }
  final String? marginAmountStr = jsonConvert.convert<String>(
      json['marginAmountStr']);
  if (marginAmountStr != null) {
    testCaseOrders.marginAmountStr = marginAmountStr;
  }
  return testCaseOrders;
}

Map<String, dynamic> $TestCaseOrdersToJson(TestCaseOrders entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['title'] = entity.title;
  data['createdAt'] = entity.createdAt;
  data['orderPayStatus'] = entity.orderPayStatus;
  data['orderChargeStatus'] = entity.orderChargeStatus;
  data['orderChannelType'] = entity.orderChannelType;
  data['orderAmount'] = entity.orderAmount;
  data['marginAmount'] = entity.marginAmount;
  data['agentUid'] = entity.agentUid;
  data['collectionDate'] = entity.collectionDate;
  data['agentUsername'] = entity.agentUsername;
  data['invoice'] = entity.invoice;
  data['createdAtStr'] = entity.createdAtStr;
  data['collectionDateStr'] = entity.collectionDateStr;
  data['orderAmountStr'] = entity.orderAmountStr;
  data['marginAmountStr'] = entity.marginAmountStr;
  return data;
}

extension TestCaseOrdersExtension on TestCaseOrders {
  TestCaseOrders copyWith({
    String? id,
    String? title,
    int? createdAt,
    int? orderPayStatus,
    int? orderChargeStatus,
    String? orderChannelType,
    int? orderAmount,
    int? marginAmount,
    String? agentUid,
    int? collectionDate,
    String? agentUsername,
    String? invoice,
    String? createdAtStr,
    String? collectionDateStr,
    String? orderAmountStr,
    String? marginAmountStr,
  }) {
    return TestCaseOrders()
      ..id = id ?? this.id
      ..title = title ?? this.title
      ..createdAt = createdAt ?? this.createdAt
      ..orderPayStatus = orderPayStatus ?? this.orderPayStatus
      ..orderChargeStatus = orderChargeStatus ?? this.orderChargeStatus
      ..orderChannelType = orderChannelType ?? this.orderChannelType
      ..orderAmount = orderAmount ?? this.orderAmount
      ..marginAmount = marginAmount ?? this.marginAmount
      ..agentUid = agentUid ?? this.agentUid
      ..collectionDate = collectionDate ?? this.collectionDate
      ..agentUsername = agentUsername ?? this.agentUsername
      ..invoice = invoice ?? this.invoice
      ..createdAtStr = createdAtStr ?? this.createdAtStr
      ..collectionDateStr = collectionDateStr ?? this.collectionDateStr
      ..orderAmountStr = orderAmountStr ?? this.orderAmountStr
      ..marginAmountStr = marginAmountStr ?? this.marginAmountStr;
  }
}